/*
 * CS_SOCIAL_REQUEST_NEWS.cpp
 *
 *  Created on: 2013. 5. 27.
 *      Author: the2
 */


#include "../../Command.h"
#include "../../User.h"
#include "../../Proxy.h"
#include "../../../../protocol/iFriends.h"

namespace ProjectZ { namespace NCommand {

void Command::CS_SOCIAL_REQUEST_NEWS(User * pUser, ::Network::Packet * pPacket)
{
	PREPARE_PACKET;

	uint8_t page = 0;
	*pPacket >> page;
	NewsInfoSyn msg;
	msg.page_num = page;

	if( msg.page_num <= 0 )
	{
		::Network::Packet * pAck = ::Network::GETPACKETPOOL()->SEND_NEW();

		pAck->MsgCat("%2d%c%c", ACK_UNKNOWN_ERROR, 1, 0);
		pAck->MakePacket(CMD_SC_SOCIAL_REQUEST_NEWS);
		pUser->Send(pAck);
	}

	::ProjectZ::NProxy::SendFriendsServer(pUser->GetUserSeq(), msg);
}

} /*NCommand*/ } /*ProjectZ*/
